package org.jeecg.modules.achachievestandarditem.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.achachievestandarditem.entity.AchAchieveStandardItem;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.achachievestandarditem.vo.AchAchieveStandardItemVo;
import org.jeecg.modules.achexaminationpaper.entity.AchExaminationPaper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Description: ach_achieve_standard_item
 * @author: baochangrong
 * @Date: 2022-03-16
 * @Version: V1.0
 */
public interface IAchAchieveStandardItemService extends IService<AchAchieveStandardItem> {


    /**
     * 根据上级评分标准id获取标准明细记录
     */
    List<AchAchieveStandardItemVo> listBystandardId(String achievementStandardId, String tenantId);

    IPage<AchAchieveStandardItemVo> queryAchievementsItemByRelObjIdType(Page<AchAchieveStandardItemVo> page, AchAchieveStandardItemVo achAchieveStandardItemVo);

    boolean createStandardItemByExamPaper(List<AchExaminationPaper> papers, String examId);

    boolean resetStandardItemByExamPaper(String examId);

    boolean cleanAchItems(String examId);

    /**
     * 获取针对试卷总分项的标准
     */
    IPage<AchAchieveStandardItemVo> getAchExamPaperStandardItem(Page<AchAchieveStandardItemVo> page, String exaPapProItemCode, String tenantId);

    int insertNewStandardItem(String json);

    /**
     * 快速添加
     */
    boolean speedAddStandardItem(JSONObject jsonObject,String tenantId);

    void checkIsStandardItemEmpty(String standardId);

    /**
     * 清理废弃数据 （不能跨租户删除）
     */
     int clearAbandon();

}
